package com.ktjy.ch01.controller;

import com.ktjy.ch01.config.Config;
import com.ktjy.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
//@PropertySource("classpath:datasource.properties")
public class IndexController {

    @Autowired
    StringUtils stringUtils;
//    @Value("${driver}")
    String username;

    @Autowired
    Config config;

    @RequestMapping("/")
    @ResponseBody
    public Object hello(){
        return config.getUrl();
    }
}
